//
//  BaseModel.m
//  Beauty
//
//  Created by Snow on 16/8/26.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel
- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

+ (__kindof BaseModel *)modelWithDic:(NSDictionary *)dic
{
    return [[self alloc]initWithDic:dic];
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {}

-(id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}

@end
